package com.lagou.rpc.client;

import com.lagou.common.service.UserService;

public class ClientBootStrap {

    public static void main(String[] args) throws Exception {

        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class);

        while (true) {
            Thread.sleep(2000);
            try {
                System.out.println(proxy.sayHello("are you ok?"));
            }catch (Exception e) {
//                System.out.println("服务端未链接，请继续尝试发送请求，并启动服务端");
//                System.out.println(e);
            }
        }
    }
}
